<template>
	<view class="page">
		<view class="status">
			<image src="/static/restaurant/common/success.png" mode="widthFix" v-if="t == 'success'"></image>
			<image src="/static/restaurant/common/warning.png" mode="widthFix" v-if="t == 'warning'"></image>
			<image src="/static/restaurant/common/error.png" mode="widthFix" v-if="t == 'error'"></image>
			<text>{{data[t]}}</text>
		</view>
		
		<view class="btns">
			<text @tap="$wanlshop.to('/pages/restaurant/user/order/order')">查看订单</text>
			<text @tap="$wanlshop.on('/pages/home')">返回首页</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:{
					success:'支付成功',
					warning:'支付失败',
					error:'订单不存在',
				},
				t:'success'
			}
		},
		onLoad(option) {
			if(option.t) {
				this.t = option.t
			}
		},
		methods: {
			
		}
	}
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="less" scoped>
.page {
	.status {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 384rpx;
		margin-bottom: 392rpx;
		image {
			width: 130rpx;
			height: 130rpx;
			margin-bottom: 40rpx;
		}
		text {
			font-size: 36rpx;
			color: #333333;
		}
	}
	.btns {
		display: flex;
		justify-content: center;
		align-items: center;
		text {
			display: inline-block;
			width: 300rpx;
			height: 84rpx;
			border-radius: 10rpx;
			border: 1px solid #FA802A;
			text-align: center;
			line-height: 84rpx;
			font-size: 36rpx;
			&:nth-child(1) {
				background: #FA802A;
				color: #fff;
				margin-right: 15rpx;
			}
			&:nth-child(2) {
				color: #FA802A;
				margin-left: 15rpx;
			}
		}
	}
}
</style>
